#include "SeqList.h"

void test_seqList_01(){
	SeqList<int>seq(5);
	cout << "Seq cap: " << seq.getCapacity() << endl;
	cout << "Seq len: " << seq.getLen() << endl;
	for(int i=0; i<5; ++i){
		seq.push_back(i);
	}
	seq.show();
	cout << "Seq cap: " << seq.getCapacity() << endl;
	cout << "Seq len: " << seq.getLen() << endl;
	for(int i=5; i<10; i++){
		seq.push_back(i);
	}
	seq.show();
	cout << "Seq cap: " << seq.getCapacity() << endl;
	cout << "Seq len: " << seq.getLen() << endl;
}
void test_seqList_02(){
	SeqList<int>seq;
	for(int i=0; i<10; ++i){
		seq.push_back(i);
	}
	seq.show();
	cout << "Seq cap: " << seq.getCapacity() << endl;
	cout << "Seq len: " << seq.getLen() << endl;
	for(int i=0; i<5; ++i){
		seq.remove(i);
	}
	seq.show();
	cout << "Seq cap: " << seq.getCapacity() << endl;
	cout << "Seq len: " << seq.getLen() << endl;

	if(seq.find(5)){
		cout << "find 5" << endl;
	}
	else{
		cout << "not find 5" << endl;
	}
	if(seq.find(0)){
		cout << "find 0" << endl;
	}
	else{
		cout << "not find 0" << endl;
	}
	seq.enlarge(1);
}



int main(){
	test_seqList_02();
	return 0;
}